@layout("/common/_container.html"){
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<div class="form-horizontal" id="userInfoForm">
			
			<input type="hidden" id="id" value="${user.id}">
			<input type="hidden" id="sexValue" value="${user.sex}">

			
			<div class="row">
				<div class="col-sm-5 b-r">
					<#input id="account" name="账户" underline="true" value="${user.account}"/>

					<#select id="sex" name="性别" underline="true">
						<option value="1">男</option>
						<option value="2">女</option>
					</#select>

					<#input id="roleid" name="角色" underline="true" value="${roleName}" disabled="disabled"/>

					<#input id="citySel" name="部门" underline="true" readonly="readonly" hidden="deptid" hiddenValue="${user.deptid}" value="${deptName}"
							clickFun="UserInfoDlg.showDeptSelectTree(); return false;"
							style="background-color: #ffffff !important;"/>

					<#input id="phone" name="电话" underline="true" value="${user.phone}"/>

					<#input id="email" name="邮箱" type="email" value="${user.email}"/>
				</div>
				<div class="col-sm-7">
					<div id="driverInfoContent">
						<#input id="name" name="名称" underline="true" value="${user.name}"/>

						<#input id="birthday" name="出生日期" underline="true" type="date"
								value="${user.birthday}"
								clickFun="laydate({istime: false, format: 'YYYY-MM-DD'})" />

						<#select id="type" name="用户类型" underline="true">
							@if(user.type == 1){
								<option value="1" selected>后台用户</option>
								<option value="2">合资公司</option>
								<option value="3">代理商</option>
							@}else if(user.type == 2){
								<option value="1">后台用户</option>
								<option value="2" selected>合资公司</option>
								<option value="3">代理商</option>
							@}else if(user.type == 3){
								<option value="1">后台用户</option>
								<option value="2">合资公司</option>
								<option value="3" selected>代理商</option>
							@}else{
								<option value="1">后台用户</option>
								<option value="2">合资公司</option>
								<option value="3">代理商</option>
							@}
						</#select>

						<#input id="commission_amount" name="提成(金额)" changeFun="UserInfoDlg.onChangeComm()" underline="true" placeholder="例如【3000 输入 3000】" value="${user.commission_amount}"/>

						<#input id="commission_ratio" name="提成(比例)" changeFun="UserInfoDlg.onChangeComm()" underline="true" placeholder="例如【10% 输入 0.1】" value="${user.commission_ratio}"/>

					</div>
				</div>
			</div>

			<!-- 这是部门选择的下拉框 -->
			<div id="menuContent" class="menuContent"
				style="display: none; position: absolute; z-index: 200;">
				<ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
			</div>

			<div class="row btn-group-m-t">
				<div class="col-sm-10">
					<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/>
					<#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="UserInfoDlg.close()"/>
				</div>
			</div>
		</div>

	</div>
</div>
<script src="${ctxPath}/static/modular/system/user/user_info.js"></script>
@}
